import {request} from '@/utils/request'

// 查询回访单列表
export function listVisit(query) {
  return request({
    url: '/workorder/woReturnVisit/list',
    method: 'get',
    params: query
  })
}

// 查询回访单列表
export function listVisitAll(query) {
  return request({
    url: '/workorder/woReturnVisit/list/all',
    method: 'get',
    params: query
  })
}

// 查询回访单详细
export function getVisit(id) {
  return request({
    url: '/workorder/woReturnVisit/' + id,
    method: 'get'
  })
}

// 新增回访单
export function addVisit(data) {
  return request({
    url: '/workorder/woReturnVisit',
    method: 'post',
    data: data
  })
}

// 修改回访单
export function updateVisit(data) {
  return request({
    url: '/workorder/woReturnVisit',
    method: 'put',
    data: data
  })
}

// 删除回访单
export function delVisit(id) {
  return request({
    url: '/workorder/woReturnVisit/' + id,
    method: 'delete'
  })
}

// 初始化回访单数据

export function getInitReturnVisit() {
  return request({
    url: '/workorder/woReturnVisit/getInitReturnVisit',
    method: 'get'
  })
}